package com.dao;

import com.pojo.Goods;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsDao {
    @Select("select * from mall_goods where newest = '是' order by rand() limit 0, 12")
    List<Goods> findNewGoods();

    @Select("select * from mall_goods where hot = '是' order by rand() limit 0, 10;")
    List<Goods> findHot();

    @Select("select * from mall_goods where id = #{id};")
    Goods findById(int id);
}
